package com.location.footprint.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import com.location.footprint.R
import com.location.footprint.utils.LogUtil

class SimpleFragment : Fragment() {
    internal var mTitle: String? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val v = inflater.inflate(R.layout.fr_simple_card, null)
        val card_title_tv = v.findViewById<View>(R.id.card_title_tv) as TextView
        card_title_tv.text = mTitle
        LogUtil.e(mTitle)

        return v
    }

    companion object {

        fun getInstance(title: String): SimpleFragment {
            val sf = SimpleFragment()
            sf.mTitle = title
            return sf
        }
    }
}